package com.gray.blog.arg.sys;

import com.gray.blog.common.arg.BaseArg;
import com.gray.blog.common.enums.front.FrontGameStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import java.util.Arrays;
import javax.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * Created  By zhoux 2019/11/19
 **/
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class AddSysGameArg extends BaseArg {

    @ApiModelProperty(value = "游戏名")
    @NotNull
    private String name;

    @ApiModelProperty(value = "简介")
    @NotNull
    private String introduction;

    @ApiModelProperty(value = "评测")
    private String evaluation;

    @ApiModelProperty(value = "封面图")
    @NotNull
    private String cover;

    @ApiModelProperty(value = "是否示于主页")
    @NotNull
    private Integer showInFront;

    @ApiModelProperty(value = "数据状态")
    @NotNull
    private Integer status;

    public boolean isWrongParam() {
        return Arrays.stream(FrontGameStatusEnum.values()).noneMatch(data -> data.getStatus().equals(status));
    }

}
